package org.pay.gate.model;

public class PayGateRespModel {

    /**
     * {
     *  "status": "Success",
     *  "content": {
     *  "BuyerID": "224802381951832089",
     *  "BillNumber": "144420221101164528",
     *  "OrderNumber": "600000031667292367",
     *  "LocalDate": "20221101",
     *  "LocalTime": "164605",
     *  "PSPName": "街口"
     *  }
     * }
     */
    //"status": "Fail"
    String status;

    PayGateRespDataModel content;


    // "status": "Fail" "msg": "ErrorCode=906, 條碼已失效"
    String msg;
    public boolean paySuccess(){
       return this.status.equals("Success");
    }


    public PayGateRespModel(String status, PayGateRespDataModel content) {
        this.status = status;
        this.content = content;
    }

    public PayGateRespModel(String status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public PayGateRespDataModel getContent() {
        return content;
    }

    public void setContent(PayGateRespDataModel content) {
        this.content = content;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "PayGateRespModel{" +
                "status='" + status + '\'' +
                ", content=" + content +
                ", msg='" + msg + '\'' +
                '}';
    }
}
